CREATE TABLE IF NOT EXISTS `__PREFIX__activityform_fromurl` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255)  NOT NULL DEFAULT '' COMMENT '标题',
  `content` text  NOT NULL COMMENT '内容',
  `qudao` varchar(100)  NOT NULL DEFAULT '' COMMENT '渠道',
  `type` varchar(50)  NOT NULL COMMENT '类型',
  `url` varchar(2550)  NOT NULL COMMENT 'url',
  `img` varchar(2550)  NOT NULL COMMENT '图',
  `name` varchar(50)  NOT NULL COMMENT '二维码名字',
  `sn` varchar(100)  NOT NULL COMMENT '标识码',
  `imgs` varchar(2550)  NOT NULL COMMENT '头图',
  `isweixin` tinyint(2) NOT NULL DEFAULT '0' COMMENT '是否需要微信',
  `fromurlques_ids` varchar(512)  DEFAULT NULL COMMENT '选择题库',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='表单url';


CREATE TABLE IF NOT EXISTS `__PREFIX__activityform_fromurldata` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '序号',
  `name` varchar(100) DEFAULT NULL COMMENT '姓名',
  `weixin` varchar(100) DEFAULT NULL COMMENT '微信号',
  `phone` varchar(100) DEFAULT NULL COMMENT '手机号',
  `createtime` bigint(16) DEFAULT NULL COMMENT '创建时间',
  `customdata` varchar(3000) DEFAULT NULL COMMENT '自定义数据',
  `fromurl_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表单数据';


CREATE TABLE IF NOT EXISTS `__PREFIX__activityform_fromurlque` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(255) DEFAULT NULL COMMENT '题目标题',
  `name_desc` varchar(512) DEFAULT NULL COMMENT '题目说明',
  `type` enum('input','radio','checkbox','image','text') CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '题目形式:input=输入框,radio=单选框,checkbox=多选框,image=图片,text=选项',
  `pid` int(11) DEFAULT NULL COMMENT '父级ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='表单url题库';

BEGIN;

ALTER TABLE `__PREFIX__activityform_fromurlque`
MODIFY COLUMN `type` ENUM('input','radio','checkbox','image','text') CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '题目形式:input=输入框,radio=单选框,checkbox=多选框,image=图片,text=选项';

COMMIT;